<template>
    <div>
      <a-form layout="inline">
        <a-form-item>
          <a-button type="primary" icon="plus-circle">
            添加
          </a-button>
        </a-form-item>
        <a-form-item>
          <a-input
            placeholder="Username"
          >
          </a-input>
        </a-form-item>
        <a-form-item>
          <a-button type="primary">
            检索
          </a-button>
        </a-form-item>
      </a-form>
      <a-table :columns="columns" :data-source="data" bordered>
        <span slot="option">
          <a>打印</a>
          <a-divider type='vertical'/>
          <a>详情</a>
          <a-divider type='vertical'/>
          <a>删除</a>
        </span>
      </a-table>
    </div>

</template>

<script>
const columns = [
  {
    title: '名称',
    dataIndex: 'name',
    key: 'name'
  },
  {
    title: '年龄',
    dataIndex: 'age',
    key: 'age'
  },
  {
    title: '地址',
    dataIndex: 'address',
    key: 'address'
  },
  {
    title: '操作',
    dataIndex: 'option',
    key: 'option',
    scopedSlots: { customRender: 'option' }
  }
]

const data = [
  {
    key: '1',
    name: 'John Brown',
    age: '25',
    address: 'New York No. 1 Lake Park'
  },
  {
    key: '2',
    name: 'Jim Green',
    age: '27',
    address: 'London No. 1 Lake Park'
  },
  {
    key: '3',
    name: 'Joe Black',
    age: '22',
    address: 'Sidney No. 1 Lake Park'
  }
]

export default {
  data () {
    return {
      data,
      columns
    }
  }
}
</script>

<style>
th.column-money,
td.column-money {
  text-align: right !important;
}
</style>
